package com.wicket.okrapp.integration.dto;

import com.wicket.okrapp.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

import lombok.Data;

/**
 * @desc OfficialDocumentDto
 * @使用场景
 */
@Data
public class OfficialDocumentDto extends BaseDto implements Serializable {

  /**
   * 公文ID
   */
  @ApiModelProperty("公文ID")
  private String officialDocumentId;

  /**
   * 公文名称
   */
  @ApiModelProperty("公文名称")
  private String officialDocumentName;

  /**
   * 公文编号
   */
  @ApiModelProperty("公文编号")
  private String officialDocumentNum;

  /**
   * 公文文件地址
   */
  @ApiModelProperty("公文文件地址")
  private String officialDocumentFileAddress;

  /**
   * 附件地址
   */
  @ApiModelProperty("附件地址")
  private String annexAddress;

  /**
   * 接收范围 EVERYONE:所有人 DEPT:部门 PERSON:个人
   */
  @ApiModelProperty("接收范围")
  private String receiveRange;

  /**
   * 接收人就职记录ID
   */
  @ApiModelProperty("接收人就职记录ID")
  private String receiveInductionId;

  /**
   * 提醒层级
   */
  @ApiModelProperty("提醒层级")
  private Long remindLevel;

  /**
   * 是否开启工作任务 TRUE:是 FALSE:否
   */
  @ApiModelProperty("是否开启工作任务")
  private String isOpenWorkTask;

  /**
   * 工作任务是否已安排 TRUE:是 FALSE:否
   */
  @ApiModelProperty("工作任务是否已安排")
  private String workTaskIsArrange;

  /**
   * 指定工作任务安排人就职记录ID
   */
  @ApiModelProperty("指定工作任务安排人就职记录ID")
  private String appointWorkTaskArrangeInductionId;

  /**
   * 主体生命周期 CURRENTLY_VALID:当前有效 EDITING:正在编辑 ARCHIVING:历史存档
   */
  @ApiModelProperty("主体生命周期")
  private String subjectLifeCycle;

  /**
   * 操作人就职记录ID
   */
  @ApiModelProperty("操作人就职记录ID")
  private String operationInductionId;

  /**
   * 操作时间
   */
  @ApiModelProperty("操作时间")
  private Date operateTime;

  /**
   * 创建人就职记录ID
   */
  @ApiModelProperty("创建人就职记录ID")
  private String createInductionId;

  /**
   * 个人账号ID
   */
  @ApiModelProperty("个人账号ID")
  private String userId;

  /**
   * 真实姓名
   */
  @ApiModelProperty("真实姓名")
  private String idCardName;

  /**
   * 用户昵称
   */
  @ApiModelProperty("用户昵称")
  private String nickName;

  /**
   * 真实头像
   */
  @ApiModelProperty("真实头像")
  private String userFace;

  /**
   * 创建时间
   */
  @ApiModelProperty("创建时间")
  private Date createTime;

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    if (!super.equals(o)) return false;
    OfficialDocumentDto that = (OfficialDocumentDto) o;
    return (
      officialDocumentId == that.officialDocumentId &&
      officialDocumentName == that.officialDocumentName &&
      officialDocumentNum == that.officialDocumentNum &&
      officialDocumentFileAddress == that.officialDocumentFileAddress &&
      annexAddress == that.annexAddress &&
      receiveRange == that.receiveRange &&
      receiveInductionId == that.receiveInductionId &&
      remindLevel == that.remindLevel &&
      isOpenWorkTask == that.isOpenWorkTask &&
      workTaskIsArrange == that.workTaskIsArrange &&
      appointWorkTaskArrangeInductionId ==
      that.appointWorkTaskArrangeInductionId &&
      subjectLifeCycle == that.subjectLifeCycle &&
      operationInductionId == that.operationInductionId &&
      operateTime == that.operateTime &&
      createInductionId == that.createInductionId &&
      userId == that.userId &&
      idCardName == that.idCardName &&
      nickName == that.nickName &&
      userFace == that.userFace &&
      createTime == that.createTime
    );
  }

  @Override
  public int hashCode() {
    return Objects.hash(
      super.hashCode(),
      officialDocumentId,
      officialDocumentName,
      officialDocumentNum,
      officialDocumentFileAddress,
      annexAddress,
      receiveRange,
      receiveInductionId,
      remindLevel,
      isOpenWorkTask,
      workTaskIsArrange,
      appointWorkTaskArrangeInductionId,
      subjectLifeCycle,
      operationInductionId,
      operateTime,
      createInductionId,
      userId,
      idCardName,
      nickName,
      userFace,
      createTime
    );
  }

}
